using UnityEngine;

public class FollowTarget : MonoBehaviour {

    [SerializeField]
    Transform _target;

    #region Properties
    public Transform Target {
        get { return _target; }
        set { _target = value; }
    }
    #endregion

    void LateUpdate() {
        if(!Target) return;

        Vector3 position = transform.position;

        position.x = Target.position.x;
        position.y = Target.position.y;

        transform.position = position;
    }
}